1. Field of the Invention
The present application relates generally to an improved data processing system and in particular to virtual memory in a data processing system. More specifically, the present application relates to an improved computer implemented method, apparatus, and computer usable program code for temporary memory mapping of executable and linking format (ELF) program segments in Linux®.
2. Description of the Related Art
When a user runs a program, the processor loads the program into random access memory (RAM), which is a temporary memory storage area in main memory. This placement of the program allows the processor to access that information. After loading the program into random access memory, the processor also loads any files that are opened for use by that program into the random access memory.
Frequently, the available amount of random access memory available in the average computer is insufficient to accommodate all of the programs and applications that a user wants to run. It is possible to add memory to increase random access memory capacity. However, purchasing additional memory can be expensive and cost prohibitive.
A majority of the information stored in random access memory is not being used at any given point in time because a processor only runs one program at a time. As a result, any programs, not being currently executed, are not used along with their associated files. Thus, the majority of random access memory is not being utilized most of the time.
Random access memory can be supplemented by moving information in random access memory that has not been recently accessed to the hard disk. Moving information from random access memory to hard disk space makes additional space in random access memory available for other programs or applications. In addition, disk space, unlike memory, is relatively inexpensive.
The technique of utilizing space on a hard disk as additional temporary memory space in order to free space in random access memory is known as “virtual memory.” Virtual memory takes limited physical random access memory and turns it into an abundant resource by utilizing hard disk space. In a virtual environment, an executing process appears to have the entire address space of the central processing unit (CPU) available to that process.
Non-uniform memory access (NUMA) is a multiprocessor architecture in which each processor in a multiprocessor has its own local memory. In addition, each processor can access the memory owned by the other processors associated with the multiprocessor. In this manner, processors in a multiprocessor can share memory locally to improve performance. A processor can access its own local memory faster than it can access memory associated with another processor. Therefore, program execution and performance can be improved by copying program data to a temporary non-uniform memory access locality associated with a processor that will access the data the most frequently.
Utilizing temporary memory space, such as virtual memory space and non-uniform memory access localities for use by large applications can result in significant performance improvements. For example, other operating systems, such as the Advanced Interactive executive (AIX®) operating system, owned by International Business Machines, Inc., and Solaris® operating system, owned by Sun Microsystems, Inc., provide a feature to use large pages to store some portions of a programs memory.
However, current methods for utilizing temporary memory space to store executable programs in these other operating systems do not work on Linux® because of differences in the implementations of memory support across these different operating systems. Moreover, existing methods in Linux® for utilizing large pages by means of the existing virtual page application program interface (API) do not permit utilization of large pages for executable program segments on Linux®.